package com.cqie.hospitalescort.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.cqie.hospitalescort.VO.AssessInfoVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

/**
 * <p>
 * 评价信息
 * </p>
 *
 * @author gdy
 * @since 2025-02-18
 */
@Getter
@Setter
@TableName("assess_info")
@ApiModel(value = "AssessInfo对象", description = "评价信息")
public class AssessInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("描述")
    @TableField(value = "content")
    private String description;

    @ApiModelProperty("评价图片")
    private String reviewPicture;

    @ApiModelProperty("评分")
    private BigDecimal score;

    @ApiModelProperty("陪诊员id")
    private Long escortId;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("评价时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("删除标识")
    @TableLogic
    private Integer deleteFlag;

    public AssessInfoVO buildVO(){
        AssessInfoVO assessInfoVO = new AssessInfoVO();
        BeanUtils.copyProperties(this, assessInfoVO);
        return assessInfoVO;
    }

}
